package com.bicon.botu.finance.payment.controller;

import com.bicon.botu.finance.payment.service.AppPaymentInfoService;
import com.bicon.botu.finance.payment.entity.AppPaymentInfoEntity;
import com.bicon.botu.core.base.common.entity.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by L on 2017/6/22.
 */
@RestController
@RequestMapping("/V1.0.0/paymentInfo")
public class AppPaymentInfoController {

    @Autowired
    private AppPaymentInfoService appPaymentInfoService;

    /**
     * 添加app支付信息
     * @param infoEntity  app支付信息
     */
    @RequestMapping(value = "/add",method = RequestMethod.POST)
    public BaseResult add(@RequestBody AppPaymentInfoEntity infoEntity){
        return appPaymentInfoService.addPaymentInfo(infoEntity);
    }

    /**
     * 更新app支付信息
     * @param infoEntity  app支付信息
     */
    @RequestMapping(value = "/update",method = RequestMethod.POST)
    public BaseResult update(@RequestBody AppPaymentInfoEntity infoEntity){
        return appPaymentInfoService.updatePaymentInfo(infoEntity);
    }

}
